package work.jame.blog.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import work.jame.blog.framework.limit.RequestLimit;
import work.jame.blog.framework.result.Result;
import work.jame.blog.pojo.ArticleClassification;
import work.jame.blog.service.ArticleClassificationService;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Jame
 * @since 2023-05-17
 */
@Api(tags = "文章分类")
@RestController
@RequestMapping("/articleClassification")
public class ArticleClassificationController {


    @Autowired
    private ArticleClassificationService articleClassificationService;

    @RequestLimit
    @ApiOperation("获取所有分类")
    @GetMapping("/queryAll")
    public Result<?> queryAll() {
        List<ArticleClassification> list = articleClassificationService.list();
        return Result.succeed(list);
    }



}
